package exercise04;

public class Data {
    public int myNumber;

    public Data() {
    }

    public Data(int myNumber) {
        this.myNumber = myNumber;
    }

    public void memory() {
        myNumber *= 100;
        System.out.println("数据被存储，存储后结果为："+myNumber);
    }

    public int read() {
        try {
            myNumber /= 100;
            System.out.println("数据被读取，读取后结果为："+myNumber);
            return myNumber;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    public int getMyNumber() {
        return myNumber;
    }

    public void setMyNumber(int myNumber) {
        this.myNumber = myNumber;
    }
}
